//
// Created by 12992 on 24-10-28.
//

#ifndef ARGS_H
#define ARGS_H
#include <argparse/argparse.hpp>

class args
{
public:
    args();

    void parse(int argc, const char** argv);

private:
    void init_rsa();

    void init_base64();

private:
    void base64_encode();

    void base64_decode();

    void generate_key();

    void rsa_decrypt();

    void rsa_encrypt();

    void rsa_public_encrypt(std::ofstream& output, const std::string& key_path, const std::string& data);

    void rsa_private_encrypt(std::ofstream& output, const std::string& key_path, const std::string& data);

    void rsa_public_decrypt(std::ofstream& output, const std::string& key_path, const std::string& data);

    void rsa_private_decrypt(std::ofstream& output, const std::string& key_path, const std::string& data);

private:
    argparse::ArgumentParser program;
    argparse::ArgumentParser base64;
    argparse::ArgumentParser rsa;
    argparse::ArgumentParser encode;
    argparse::ArgumentParser decode;
    argparse::ArgumentParser gen_key_pair;
    argparse::ArgumentParser encrypt;
    argparse::ArgumentParser decrypt;
};


#endif //ARGS_H
